#pragma once

#include <stdio.h>
#include <string.h>
#include "esp_vfs_fat.h"
#include "sdmmc_cmd.h"
#include "driver/sdmmc_host.h"

#ifdef __cplusplus
extern "C" {
#endif

#define BSP_SD_CLK          (47)
#define BSP_SD_CMD          (48)
#define BSP_SD_D0           (21)

#define MOUNT_POINT              "/sdcard"
#define EXAMPLE_MAX_CHAR_SIZE    64

esp_err_t sd_write_file(const char *path, char *data);
esp_err_t sd_read_file(const char *path, char *data);
esp_err_t sd_fatfs_init(void);
esp_err_t sd_fatfs_deinit(void);

#ifdef __cplusplus
}
#endif